package org.dtrd.modules.content.articles.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dtrd.modules.content.articles.entity.bean.ArticleInfo;
import org.dtrd.modules.content.articles.entity.bean.GroupItem;
import org.dtrd.modules.content.articles.entity.po.DtrdExtEmsContent;

import java.util.List;

/**
 * @author 萧
 * @date 2021-08-25 17:37:46
 **/
public interface IDtrdExtEmsContentService extends IService<DtrdExtEmsContent> {

    IPage<DtrdExtEmsContent> getArticleList(Integer pageNum, Integer pageSize, Integer articleCategory, String title, String keyword);

    ArticleInfo getArticleInfoById(Integer dataId);

    void clearArticleClass(Integer classId);

    /**
     * 新增编辑文章
     *
     * @param info
     */
    void manageArticle(ArticleInfo info);

    /**
     * 删除文章
     *
     * @param articleId
     */
    void deleteArticle(Integer articleId);

    /**
     * 查询文章分类下最新推荐
     *
     * @return
     */
    List<GroupItem<String, ArticleInfo>> getGroupRecommendArticleList();

}
